/* 该程序计算两点之间的距离 */
#include <stdio.h>
#include <math.h>

int main(void)
{
  /* 声明和初始化变量 */
  double x1 = 1, y1 = 5, x2 = 4, y2 = 7,
          side_1, side_2, distance;
  
  /* 计算直角三角形的边 */
  side_1 = x2 - x1;
  side_2 = y2 - y1;
  distance = sqrt(side_1*side_1 + side_2*side_2);
  
  /* 打印两点之间的距离 */
  printf("The distance between the two points is %5.2f\n",
          distance);
  
  /* 退出程序 */
  return 0;
}